package com.yongjie.springbootlogin.mapper.Impl;

import com.yongjie.springbootlogin.entity.DoctorInfo;
import com.yongjie.springbootlogin.entity.Registration;
import com.yongjie.springbootlogin.mapper.RegistrationMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**挂号
 * @author 13468
 */
public class RegistrationImpl implements RegistrationMapper {
    @Autowired
    private RegistrationMapper registrationMapper;


    /**
     * 添加数据
     *
     * @return
     */
    @Override
    public int inseraddData(String pai_name, String pai_phone, String pai_meal, String doc_id, String time) {
        return registrationMapper.inseraddData(pai_name, pai_phone, pai_meal, doc_id, time);
    }

    /**
     * 查询医生信息
     *
     * @return
     */
    @Override
    public List<DoctorInfo> selcDoctor() {
        return registrationMapper.selcDoctor();
    }

    /**
     * 获取挂号信息
     *
     * @return
     */
    @Override
    public List<Registration> ListRegistration() {
        return registrationMapper.ListRegistration();
    }
    /**
     * 获取数据总条数
     * @return
     */
    @Override
    public Integer RegistrationCount() {
        return registrationMapper.RegistrationCount();
    }


    /**
     * 获取分页数据
     * @param currentPage
     * @param pageSize
     * @return
     */
    @Override
    public List<Registration> getRegistrationPages(int currentPage, int pageSize) {
        return registrationMapper.getRegistrationPages(currentPage,pageSize);
    }

    /**
     * 医生对应的挂号记录
     * @param currentPage
     * @param pageSize
     * @param id
     * @return
     */
    @Override
    public List<Registration> getdcList(int currentPage, int pageSize, String id) {
        return registrationMapper.getdcList(currentPage,pageSize,id);
    }

    @Override
    public List<Registration> selRegistration(String paiName, String paiPhone) {
        return registrationMapper.selRegistration(paiName, paiPhone);
    }

    @Override
    public Registration getRegfindById(String id) {
        return registrationMapper.getRegfindById(id);
    }

    @Override
    public int delreg(String id) {
        return registrationMapper.delreg(id);
    }

    /**
     * 删除数据
     * @param id
     * @return
     */
    @Override
    public int deleteRegistration(String id) {
        return registrationMapper.deleteRegistration(id);
    }

}
